package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class ShopColumnDef implements Serializable {

	private static final long serialVersionUID = 5291551067252640521L;

	//fields
	private java.lang.Integer id;
	private java.lang.String name;
	private java.lang.String url;
	private java.lang.Boolean required;
	private java.lang.Integer position;
	private java.lang.Integer displayOrder;

	//default constructor
	public ShopColumnDef() {
	}

	//getter
	public java.lang.Integer getId() {
		return id;
	}
	public java.lang.String getName() {
		return name;
	}
	public java.lang.String getUrl() {
		return url;
	}
	public java.lang.Boolean isRequired() {
		return required;
	}
	public java.lang.Integer getPosition() {
		return position;
	}
	public java.lang.Integer getDisplayOrder() {
		return displayOrder;
	}

	//setter
	public void setId(java.lang.Integer id) {
		this.id = id;
	}
	public void setName(java.lang.String name) {
		this.name = name;
	}
	public void setUrl(java.lang.String url) {
		this.url = url;
	}
	public void setRequired(java.lang.Boolean required) {
		this.required = required;
	}
	public void setPosition(java.lang.Integer position) {
		this.position = position;
	}
	public void setDisplayOrder(java.lang.Integer displayOrder) {
		this.displayOrder = displayOrder;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof ShopColumnDef))
			return false;

		final ShopColumnDef shopColumnDef = (ShopColumnDef)other;
		if (!this.id.equals(shopColumnDef.getId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(id).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("ShopColumnDef[")
			.append("id=").append(id).append(", ")
			.append("name=").append(name).append(", ")
			.append("url=").append(url).append(", ")
			.append("required=").append(required).append(", ")
			.append("position=").append(position).append(", ")
			.append("displayOrder=").append(displayOrder).append("]").toString();
	}
}